package milecToMinisat;


/** 
 * This class, implementing the IntegerExp interface, describes integer operation. 
 * Operands are IntegerExp and thus, objects can be defined recursively.
 * @author ter-topcased-ups
 * @version 0.01, 2008/12/03
 * 
 */
public class IntegerOperation implements IntegerExp {

	private IntegerExp leftSide ;
	private IntegerOperator op ;
	private IntegerExp rightSide ;
	
	public IntegerOperation(IntegerExp leftSide, IntegerOperator op, IntegerExp rightSide) {
		this.leftSide = leftSide ;
		this.op = op ;
		this.rightSide= rightSide ;
	}
	
	/**
	 * @return the leftSide
	 */
	public IntegerExp getLeftSide() {
		return leftSide;
	}

	/**
	 * @return the operator
	 */
	public IntegerOperator getOp() {
		return op;
	}

	/**
	 * @return the rightSide
	 */
	public IntegerExp getRightSide() {
		return rightSide;
	}

	public  int getSize() {
		return op.getSize(leftSide, rightSide) ;
	}
}
